{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "from denoising_autoencoder.noisy_dataset import NoisyMnistDataset\n",
    "\n",
    "\n",
    "dataset = NoisyMnistDataset(data_root='./denoising_autoencoder/mnist', zero_prob=0.25)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x11c5cf278>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAIgAAAD8CAYAAACsCeyFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADtxJREFUeJzt3XuMFdUdB/Dvz32wCIrdBel2obAKakEbMVTAGm1SSVeaBkjRLK3WJsRtUkxpYlJEo6aJGmtCTW1tUtQVTSwWaX00wVIwvp+sgLJAcRG1LuUh1soqZWXZX/+4w8w9t8xvZ+9jZu7d7ye58Zw5s3uO5Ldnzsyd+Y2oKojCnJT0ACjdGCBkYoCQiQFCJgYImRggZGKAkKmgABGRFhHZKSK7ROSGYg2K0kPyvVAmIlUA3gEwG0A3gI0AFqrq9uINj5JWXcDPXghgl6ruBgAReRTAXAChAVIrw7QOIwrokoqlB58cVNUxA+1XSIA0Afgwq94NYIb1A3UYgRny7QK6pGLZoGs+iLJfIQESiYi0AWgDgDqcXOruqMgKWaTuATA+qz7O2+ZQ1RWqOl1Vp9dgWAHdURIKCZCNACaLSLOI1AJoBfBUcYZFaZH3IUZV+0TkOgDrAFQBaFfVbUUbGaVCQWsQVV0LYG2RxkIpxCupZGKAkIkBQiYGCJkYIGRigJCJAUImBgiZGCBkYoCQi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5JAeMCxepWVTDk/GVSr7JAeMSZ4DsATA+qz7O25a0/V4SPsSdjM9KDpjEeE4kzgDZCGCyiDSLSC2AVmQS4SUtkWR8ZZMcMOaF2BwA7wB4F8BNCSwEVyGTNfooMmugRQAakDlb6AKwAUB9TGO5GJnDx9sAtnifOUmNJ+zDK6lk4iKVTAwQMjFAyMQAIRMDhEwMEDIxQMjEACHT/wBQWIOfhVtVjAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "%matplotlib inline\n",
    "\n",
    "img, corrupted_img = dataset[2222]\n",
    "\n",
    "plt.figure(1)\n",
    "plt.subplot(211)\n",
    "plt.imshow(img.numpy().reshape((28, 28)))\n",
    "plt.subplot(212)\n",
    "plt.imshow(corrupted_img.numpy().reshape((28, 28)))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
